<!--{subtemplate jameson_read:touch/header}-->
<div class="header">
  <div class="weui-flex">
    <div class="weui-flex__item header_left">
      <a href="{eval echo mbreurl('author',0);}">
        <i class="fa fa-address-book-o"></i>
      </a>
    </div>
    <div class="weui-flex__item header_title">
      <a href="{eval echo mbreurl('book',$books['book_id']);}">
      <!--{$books['book_name']}-->
      
    </a>
    </div>
    <div class="weui-flex__item header_right">
      <a href="{eval echo mbreurl('index');}">
        <i class="fa fa-home"></i>
      </a>
    </div>
  </div>
</div>

<form action="./plugin.php?id=jameson_read&contrl=touchauthor&act=postbook" method="post" enctype="multipart/form-data" id="book_descro_menu">
  <div class="weui-cells">
    <div class="weui-cell">
      <div class="weui-cell__bd">
        <ul class="weui-uploader__files" id="uploaderFiles">
          <li class="weui-uploader__file" style="background-image:url({if $books['image'] && preg_match('/^http|\/\//i',$books['image'])}{$books['image']}{elseif is_file('./data/attachment/forum/'.$books['image'])}./data/attachment/forum/{$books['image']}{else}{$_G['jameson_read']['morenfengmian']}{/if})"></li>
        </ul>
        <div class="weui-uploader__input-box">
          <input id="uploaderInput" onchange="jameson.setfm(this.files[0])" class="weui-uploader__input" type="file" accept="image/*"   name="imgname">
        </div>
      </div>
    </div>
    <input type="hidden" name="formhash" value="{FORMHASH}" />
    <input type="hidden" name="book_id" value="{$books['book_id']}" />
          <div class="weui-cell">
              <div class="weui-cell__hd">
                <label class="weui-label">
                  <!--{lang jameson_read:shuming}-->
                </label>
              </div>
              <div class="weui-cell__bd">
                <input required class="weui-input" id="book_name" name="book_name" value="{$books['book_name']}"  type="text" placeholder="{lang jameson_read:zaicishuru}{lang jameson_read:shuming}">
              </div>
          </div>

          <div class="weui-cell">
              <div class="weui-cell__hd">
                <label class="weui-label">
                  <!--{lang jameson_read:zuozhe}-->
                </label>
              </div>
              <div class="weui-cell__bd">
                <input class="weui-input" id="author" name="author" value="{$books['author']}" type="text" placeholder="{lang jameson_read:zaicishuru}{lang jameson_read:zuozhe}">
              </div>
          </div>   
          <div class="weui-cell weui-cell_select weui-cell_select-after">
              <div class="weui-cell__hd">
                <label class="weui-label">
                  <!--{lang jameson_read:fenlei}-->
                </label>
              </div>
              <div class="weui-cell__bd">
                <select name="parent_id" class="weui-select" id="selectcategory" onchange="jameson.changeCategory(this)" >
                  <!--{loop $books['categorys'] $value}-->
                    <option {if $value['category_id'] == $books['parent_id']}selected{/if} value="{$value['category_id']}">
                    <!--{$value['category_name']}-->
                    </option>
                  <!--{/loop}-->
                </select>
                <select name="category_id" class="weui-select" id="selectcategory_menu" >
                  <!--{loop $books['childcate'] $value}-->
                    <option {if $value['category_id'] == $books['category_id']}selected{/if}  value="{$value['category_id']}">
                    <!--{$value['category_name']}-->
                    </option>
                  <!--{/loop}-->
                </select>
              </div>
          </div> 
        <div class="weui-cell">
            <div class="weui-cell__hd">
              <label class="weui-label">
                <!--{lang jameson_read:jianjie}-->
              </label>
            </div>
            <div class="weui-cell__bd">
              <textarea class="weui-textarea" name="desco" id="desco"  >{eval echo $books['desco']}</textarea>
            </div>
        </div>   
        <div class="weui-cell">
            <div class="weui-cell__hd">
              <label class="weui-label">
                <!--{lang jameson_read:zhuangtai}-->
              </label>
            </div>
            <div class="weui-cell__bd">
              <select class="weui-select"  name="plan" id="plan" >
                  <option {if $books['plan']<1} selected {/if} value="0">{lang jameson_read:lianzaizhong}</option>
                  <option {if $books['plan']} selected {/if} value="1">{lang jameson_read:yiwanjie}</option>
              </select>
            </div>
        </div>   
    <!-- end -->
  </div>
  <div class="weui-btn-area">
        <button type="button" onclick="jameson.tjbook()" class="weui-btn weui-btn_warn" >
        <!--{lang jameson_read:tijiao}-->
        </button>
  </div>
</form>


<!--{loop $books['fenjuan']  $juan}-->
<div class="weui-flex mt15">
  <div class="weui-flex__item">
    <!--{if !$juan['colums']}-->
    <h3 class="margin-left">[
    <!--{lang jameson_read:zanwuzhangjie}-->
    ]
    </h3>
    <!--{/if}-->
  </div>
    <div class="weui-flex__item text-right">
      <a class="weui-btn weui-btn_mini weui-btn_primary" href="./plugin.php?id=jameson_read&contrl=touchauthor&act=editcolum&fid={$_G['jameson_read']['fid']}&j_id={$juan['j_id']}&book_id={$books['book_id']}">+
      <!--{lang jameson_read:tianjiaxinzhangjie}-->
      </a>
    </div>
  </div>
  <!--{if $juan['colums']}-->
  <!--{loop $juan['colums'] $colum}-->
    <div  id="colums_{$colum['colum_id']}" class="weui-cell weui-cell_access">
      <div class="weui-cell__bd">
        <!--{if $authorinfo['allowedit']}-->
        <a class="weui-btn_default" href="./plugin.php?id=jameson_read&contrl=touchauthor&act=editcolum&fid={$_G['jameson_read']['fid']}&j_id={$juan['j_id']}&book_id={$books['book_id']}&colum_id={$colum['colum_id']}&tid={$colum['tid']}">
           [{lang jameson_read:bianji}]
           <!--{$colum['subject']}-->
        <!--{else}-->
          <a  href="javascript:$.toast('{lang jameson_read:jinzhibianjizhangjie}','forbidden');">{lang jameson_read:jinzhibianjizhangjie}
        <!--{/if}-->
          </a>
        </a>
      </div>
      <div class="weui-cell__ft">
        <!--{if $authorinfo['allowedit']}-->
        <span onclick="jameson.remove(this,'colums',{$colum['colum_id']})" class="">
        <!--{lang jameson_read:shanchu}-->
        </span>
        <!--{/if}-->
      </div>
    </div>
  <!--{/loop}-->
  <!--{/if}-->
</div>
<!--{/loop}-->
<!--{subtemplate jameson_read:touch/footer}-->